package com.elitel.frame.base.controller.dataAnalyze;

import java.util.ArrayList;
import java.util.List;

import com.elitel.common.mongodb.GeneralCallInterfaceRecord;
//import com.elitel.common.mongodb.GeneralCallInterfaceRecordRepository;
import com.elitel.frame.base.service.mongodb.GeneralMongoService;
import com.elitel.frame.main.entity.vo.JsonDataResult;
import com.elitel.frame.main.entity.vo.JsonResult;
import com.elitel.frame.main.entity.vo.PageRequestVo;
import com.elitel.frame.main.entity.vo.PageResponseVo;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;

import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import static com.mongodb.client.model.Filters.*;
import static com.mongodb.client.model.Projections.*;
import static com.mongodb.client.model.Sorts.descending;


import lombok.extern.slf4j.Slf4j;

@Controller
@RequestMapping("/dataAnalyze/callInterfaceRecordController")
@Slf4j
public class CallInterfaceRecordController{

    // here need to inject service of CallInterfaceRecordService (here is include  all service logic for CallInterfaceRecord)

    @Autowired
    private  GeneralMongoService generalMongoService;

    // @Autowired
    // private GeneralCallInterfaceRecordRepository callInterfaceRecordService;
    @RequestMapping("/findAllByPagination")
    @ResponseBody
    public Object findAllByPagination(Integer pageNo, Integer pageSize, Long executeTimeCondition, String serviceId){

        return generalMongoService.findAllByPagination(pageNo, pageSize, executeTimeCondition, serviceId);
    }

}
